Integrand size = 21, antiderivative size = 131 \[ \int \sec ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {\left (6 a^2-b^2\right ) \text {arctanh}(\sin (c+d x))}{16 d}+\frac {7 a b \sec ^5(c+d x)}{30 d}+\frac {\left (6 a^2-b^2\right ) \sec (c+d x) \tan (c+d x)}{16 d}+\frac {\left (6 a^2-b^2\right ) \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {b \sec ^5(c+d x) (a+b \tan (c+d x))}{6 d} \]
[Out]
Time = 0.14 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3589, 3567, 3853, 3855} \[ \int \sec ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {\left (6 a^2-b^2\right ) \text {arctanh}(\sin (c+d x))}{16 d}+\frac {\left (6 a^2-b^2\right ) \tan (c+d x) \sec ^3(c+d x)}{24 d}+\frac {\left (6 a^2-b^2\right ) \tan (c+d x) \sec (c+d x)}{16 d}+\frac {7 a b \sec ^5(c+d x)}{30 d}+\frac {b \sec ^5(c+d x) (a+b \tan (c+d x))}{6 d} \]
[In]
[Out]
Rule 3567
Rule 3589
Rule 3853
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \frac {b \sec ^5(c+d x) (a+b \tan (c+d x))}{6 d}+\frac {1}{6} \int \sec ^5(c+d x) \left (6 a^2-b^2+7 a b \tan (c+d x)\right ) \, dx \\ & = \frac {7 a b \sec ^5(c+d x)}{30 d}+\frac {b \sec ^5(c+d x) (a+b \tan (c+d x))}{6 d}+\frac {1}{6} \left (6 a^2-b^2\right ) \int \sec ^5(c+d x) \, dx \\ & = \frac {7 a b \sec ^5(c+d x)}{30 d}+\frac {\left (6 a^2-b^2\right ) \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {b \sec ^5(c+d x) (a+b \tan (c+d x))}{6 d}+\frac {1}{8} \left (6 a^2-b^2\right ) \int \sec ^3(c+d x) \, dx \\ & = \frac {7 a b \sec ^5(c+d x)}{30 d}+\frac {\left (6 a^2-b^2\right ) \sec (c+d x) \tan (c+d x)}{16 d}+\frac {\left (6 a^2-b^2\right ) \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {b \sec ^5(c+d x) (a+b \tan (c+d x))}{6 d}+\frac {1}{16} \left (6 a^2-b^2\right ) \int \sec (c+d x) \, dx \\ & = \frac {\left (6 a^2-b^2\right ) \text {arctanh}(\sin (c+d x))}{16 d}+\frac {7 a b \sec ^5(c+d x)}{30 d}+\frac {\left (6 a^2-b^2\right ) \sec (c+d x) \tan (c+d x)}{16 d}+\frac {\left (6 a^2-b^2\right ) \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {b \sec ^5(c+d x) (a+b \tan (c+d x))}{6 d} \\ \end{align*}
Time = 0.07 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.28 \[ \int \sec ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {3 a^2 \text {arctanh}(\sin (c+d x))}{8 d}-\frac {b^2 \text {arctanh}(\sin (c+d x))}{16 d}+\frac {2 a b \sec ^5(c+d x)}{5 d}+\frac {3 a^2 \sec (c+d x) \tan (c+d x)}{8 d}-\frac {b^2 \sec (c+d x) \tan (c+d x)}{16 d}+\frac {a^2 \sec ^3(c+d x) \tan (c+d x)}{4 d}-\frac {b^2 \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {b^2 \sec ^5(c+d x) \tan (c+d x)}{6 d} \]
[In]
[Out]
Time = 15.70 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.14
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {2 a b}{5 \cos \left (d x +c \right )^{5}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{6 \cos \left (d x +c \right )^{6}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{16 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{16}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )}{d}\) | \(149\) |
default | \(\frac {a^{2} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {2 a b}{5 \cos \left (d x +c \right )^{5}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{6 \cos \left (d x +c \right )^{6}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{16 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{16}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )}{d}\) | \(149\) |
risch | \(-\frac {i {\mathrm e}^{i \left (d x +c \right )} \left (90 a^{2} {\mathrm e}^{10 i \left (d x +c \right )}-15 b^{2} {\mathrm e}^{10 i \left (d x +c \right )}+510 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}-85 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+420 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}+570 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+1536 i a b \,{\mathrm e}^{6 i \left (d x +c \right )}-420 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-570 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+1536 i a b \,{\mathrm e}^{4 i \left (d x +c \right )}-510 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+85 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-90 a^{2}+15 b^{2}\right )}{120 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{6}}-\frac {3 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{2}}{16 d}+\frac {3 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{2}}{16 d}\) | \(319\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.08 \[ \int \sec ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {15 \, {\left (6 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{6} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (6 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{6} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 192 \, a b \cos \left (d x + c\right ) + 10 \, {\left (3 \, {\left (6 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (6 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 8 \, b^{2}\right )} \sin \left (d x + c\right )}{480 \, d \cos \left (d x + c\right )^{6}} \]
[In]
[Out]
\[ \int \sec ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right )^{2} \sec ^{5}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.58 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.37 \[ \int \sec ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {5 \, b^{2} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 8 \, \sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 30 \, a^{2} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + \frac {192 \, a b}{\cos \left (d x + c\right )^{5}}}{480 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 343 vs. \(2 (121) = 242\).
Time = 0.54 (sec) , antiderivative size = 343, normalized size of antiderivative = 2.62 \[ \int \sec ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {15 \, {\left (6 \, a^{2} - b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 15 \, {\left (6 \, a^{2} - b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (150 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 15 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 480 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{10} - 210 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 235 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 480 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 60 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 390 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 960 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 60 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 390 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 960 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 210 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 235 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 96 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 150 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 96 \, a b\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{6}}}{240 \, d} \]
[In]
[Out]
Time = 6.89 (sec) , antiderivative size = 328, normalized size of antiderivative = 2.50 \[ \int \sec ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {\left (\frac {5\,a^2}{4}+\frac {b^2}{8}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}-4\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+\left (\frac {47\,b^2}{24}-\frac {7\,a^2}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+4\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+\left (\frac {a^2}{2}+\frac {13\,b^2}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-8\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (\frac {a^2}{2}+\frac {13\,b^2}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+8\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (\frac {47\,b^2}{24}-\frac {7\,a^2}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-\frac {4\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{5}+\left (\frac {5\,a^2}{4}+\frac {b^2}{8}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {4\,a\,b}{5}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (\frac {3\,a^2}{4}-\frac {b^2}{8}\right )}{d} \]
[In]
[Out]